package com.villaday.idf.custom;

import android.app.Dialog;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.Window;

import com.villaday.idf.R;
import com.villaday.idf.base.BaseDialog;


/**
 * 确认 对话框
 */
public class ChooseTypeDialog extends BaseDialog  {

    public static ChooseTypeDialog newInstance() {
        ChooseTypeDialog dialog = new ChooseTypeDialog();

        return dialog;
    }

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        View view = getActivity().getLayoutInflater().inflate(R.layout.popu_choose_default, null);
     /*   AlertDialog alertDialog = new AlertDialog.Builder(getActivity(),R.style.dialog_radius)
                .setView(view)
                .create();
        //点击对话框外不可取消
        alertDialog.setCanceledOnTouchOutside(true);*/
        Dialog dialog = new Dialog(getActivity(),
                R.style.dialog);
        dialog.setCancelable(true);
        dialog.setContentView(view);

        //进入退出动画
        Window window = dialog.getWindow();
        window.setGravity(Gravity.TOP);

        return dialog;
    }


}
